package cn.scu.ne04jdemo.entitiy;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@TableName(value = "t_user")
public class User implements Serializable {
    private final static long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Long id;
    private String account;
    private String name;
    private String tel;
    @JsonIgnore
    private String password;
    private String role;
    private String enterprise;
    private String department;
    private String address;

    @TableField(fill = FieldFill.INSERT)
    @JsonIgnore
    private LocalDateTime createDate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonIgnore
    private LocalDateTime updateDate;
}
